-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix creation of registers in synthesis methods (backport #13086) #13123
Conversation
* add qregs to output circuits * never develop while not on up-to-date main * one shan't commit faster than ones IDE can run black * avoid compose (cherry picked from commit 1962704) # Conflicts: # qiskit/synthesis/linear_phase/cz_depth_lnn.py # qiskit/synthesis/permutation/permutation_reverse_lnn.py
Cherry-pick of 1962704 has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
Thank you for opening a new pull request. Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone. One or more of the following people are relevant to this code:
|
some methods are not available in Rust on 1.2, so there's no add_regs flag to add
Pull Request Test Coverage Report for Build 10807347177Details
💛 - Coveralls |
Summary
Fixes #13041 (and the same problem in other places, but no one complained yet 🙂).
Details and comments
With the moving the circuit creation to Rust-space, we created circuits that did not have any quantum (or classical) registers, which led to issues as #13041. This PR adds an argument
add_regs
toQuantumCircuit._from_circuit_data
(defaultFalse
) which allows to add these registers and create backward-compatible circuits. In places where the final circuit was created from circuit data, this argument is set toTrue
.This is an automatic backport of pull request #13086 done by [Mergify](https://mergify.com).